
package baseservergrid;

import autorization.test.*;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import repository.test.*;
import taskmanager.test.TaskmanagerTest;
import userservercontroller.test.USCTest;

/**
 * Основной класс серверного приложения
 * @author GFD
 */
public class Main {
    public static void main(String[] args){
        boolean IsTest = false; //признак тестового запуска
        if(IsTest){
            System.out.println("----------------Start Gold Flimsy Test---------------------");
            try{
                new AutorizationTableTest();
                new RulesTableTest();
                new RolesTableTest();
                new TaskmanagerTest();
                new USCTest();
                new repository.test.TestRepository();
                new TestRepository();
                System.out.println("-----------Succesful End Gold Flimsy Test------------------");
            }catch(Exception e){
                System.out.println("-------------------Test corrapted--------------------------");
            }
        }else{
            //Инициализация стиля окна
            try {
                UIManager.setLookAndFeel(new com.nilo.plaf.nimrod.NimRODLookAndFeel());
            } catch (Exception e) { e.printStackTrace(); }
            //Загрузка основного окна
            try{
                JServerMainFrame mainFrame=new JServerMainFrame();
                mainFrame.setVisible(true);
            }catch(Exception e){
                System.out.println("ERROR: Programm failed");
                System.exit(0);
            }
        }
    }
}// end class Main


